/**
 * 医生病例列表
 */
var CaseTableDetail = {
    id: "CaseTableDetails",	//表格id
    seItem: null,		//选中的条目
    table: null,
    layerIndex: -1
};

/**
 * 初始化表格的列
 */
CaseTableDetail.initColumn = function () {
    var columns = [
        {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
        {title: 'customerId', field: 'customerId', visible: false, align: 'center', valign: 'middle'},
        {title: 'reservationsId', field: 'reservationsId', visible: false, align: 'center', valign: 'middle'},
        {title: '病历号', field: 'medicalRecordNumber', align: 'center', valign: 'middle', sortable: true},
        {title: '客户姓名', field: 'customerName', align: 'center', valign: 'middle', sortable: true},
        {title: '主诉', field: 'zhushu', align: 'center', valign: 'middle', sortable: true},
        {title: '现病史', field: 'nowMedicalHistory', align: 'center', valign: 'middle', sortable: true},
        {title: '既病史', field: 'beforeMedicalHistory', align: 'center', valign: 'middle', sortable: true},
        {title: '口腔检查', field: 'mouthCheck', align: 'center', valign: 'middle', sortable: true},
        {title: '诊断', field: 'diagnose', align: 'center', valign: 'middle', sortable: true},
        {title: '治疗计划', field: 'remedyPlan', align: 'center', valign: 'middle', sortable: true},
        {title: '处置', field: 'dispose', align: 'center', valign: 'middle', sortable: true},
        {title: '医嘱', field: 'doctorAdvice', align: 'center', valign: 'middle', sortable: true},
    ]
    return columns;
};

$(function () {
    var defaultColunms = CaseTableDetail.initColumn();
    var table = new BSTable(CaseTableDetail.id, "/doctorLooked/case_details" ,defaultColunms);
    table.setPaginationType("client");//客户端分页
    CaseTableDetail.table = table.init();
    CaseTableDetail.search();
});
